import { Entity, CreateDate, UpdateDate, Day, Lesson, PrimaryUuid, Digdit, Remark, DateTime, GymPlaceId, GymTeacherId, GymCourseId, Week, Time, Date, Code, Boolean } from '@sker/core'
/**
 * why
 */
@Entity({
    name: 'gym_schedule',
})
export class GymSchedule {
    static title: string = `排班`;
    static resource: string = `gym_schedule`;
    /**
     * 关系
     */
    @GymPlaceId({ comment: '场所', nullable: true })
    place_id!: string;

    @GymTeacherId({ comment: '教师', nullable: true })
    teacher_id!: string;

    @GymCourseId({ comment: '课程', nullable: true })
    course_id!: string;

    @Code({ comment: '类型', default: '' })
    type: string;

    @Code({ comment: '状态' })
    status: string;

    @Digdit({ comment: '最小人数', default: 0 })
    min: number;

    @Digdit({ comment: '最大人数', default: 0 })
    max: number;

    /**
     * 基础
     */
    @PrimaryUuid({
        primaryKeyConstraintName: "PK_GYM_SCHEDULE_ID"
    })
    id!: string;

    @Week({ comment: '周几' })
    week!: string;

    @Date({ comment: '日期' })
    date!: Date;

    @Time({
        comment: '开始',
        default: '08:00'
    })
    start_time!: Date;

    @Time({
        type: 'time without time zone',
        comment: '结束',
        default: '18:00'
    })
    end_time!: Date;

    @Digdit({ comment: '时长' })
    duration!: number;

    @Remark({ comment: '备注' })
    remark!: string;

    @CreateDate({
        comment: '创建日期'
    })
    create_date!: Date;

    @UpdateDate({
        comment: '更新日期'
    })
    update_date!: Date;
}